#define  _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string.h>
int main() {
    char arr1[100] = { 0 };
    char arr2[100] = { 0 };
    gets(arr1);
    gets(arr2);
    int len1 = strlen(arr1);
    int len2 = strlen(arr2);
    int i = 0;
    int j = 0;
    for (i = 0;i < len1;i++) {
        int flag = 1;
        for (j = 0;j < len2;j++) {
            if ((arr1[i] == arr2[j]) && (arr1[i] != ' ')) {
                flag = 0;
                break;
            }
        }
        if (flag == 1) {
            printf("%c", arr1[i]);
        }
    }

    return 0;
}